import instance from '@/utils/request'

//获取所有角色信息
export function getRolesApi(){
    return instance({
        url:'/sys/role'
    })
}

//通过id获得角色详情
export function getRolesIdApi(id){
    return instance({
        url:`/sys/role/${id}`
    })
}

//给角色分配权限
export function setAssignPremApi(data){
    return instance({
        url:'/sys/role/assignPrem',
        method:'PUT',
        data
    })
}